<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    748. Largest Number At Least Twice of Others
   </h1>
   <p>
    In a given integer array
    <code>
     nums
    </code>
    , there is always exactly one largest element.
   </p>
   <p>
    Find whether the largest element in the array is at least twice as much as every other number in the array.
   </p>
   <p>
    If it is, return the
    <strong>
     index
    </strong>
    of the largest element, otherwise return -1.
   </p>
   <p>
    <strong>
     Example 1:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> nums = [3, 6, 1, 0]
<strong>Output:</strong> 1
<strong>Explanation:</strong> 6 is the largest integer, and for every other number in the array x,
6 is more than twice as big as x.  The index of value 6 is 1, so we return 1.
</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     Example 2:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> nums = [1, 2, 3, 4]
<strong>Output:</strong> -1
<strong>Explanation:</strong> 4 isn't at least as big as twice the value of 3, so we return -1.
</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     Note:
    </strong>
   </p>
   <ol>
    <li>
     <code>
      nums
     </code>
     will have a length in the range
     <code>
      [1, 50]
     </code>
     .
    </li>
    <li>
     Every
     <code>
      nums[i]
     </code>
     will be an integer in the range
     <code>
      [0, 99]
     </code>
     .
    </li>
   </ol>
   <p>
    &nbsp;
   </p>
  </div>
  <div>
   <h1 class="question_title">
    748. 至少是其他数字两倍的最大数
   </h1>
   <p>
    在一个给定的数组
    <code>
     nums
    </code>
    中，总是存在一个最大元素 。
   </p>
   <p>
    查找数组中的最大元素是否至少是数组中每个其他数字的两倍。
   </p>
   <p>
    如果是，则返回最大元素的索引，否则返回-1。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre>
<strong>输入:</strong> nums = [3, 6, 1, 0]
<strong>输出:</strong> 1
<strong>解释:</strong> 6是最大的整数, 对于数组中的其他整数,
6大于数组中其他元素的两倍。6的索引是1, 所以我们返回1.
</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre>
<strong>输入:</strong> nums = [1, 2, 3, 4]
<strong>输出:</strong> -1
<strong>解释:</strong> 4没有超过3的两倍大, 所以我们返回 -1.
</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     提示:
    </strong>
   </p>
   <ol>
    <li>
     <code>
      nums
     </code>
     &nbsp;的长度范围在
     <code>
      [1, 50]
     </code>
     .
    </li>
    <li>
     每个&nbsp;
     <code>
      nums[i]
     </code>
     &nbsp;的整数范围在&nbsp;
     <code>
      [0, 99]
     </code>
     .
    </li>
   </ol>
  </div>
 </body>
</html>